﻿@model YearsGoneBy.ViewModels.Photos.PhotoSubmisionViewModel

@{
    ViewBag.Title = "PhotoSubmision";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Photo Submision</h2>

@if(ViewBag.Error != null)
{
    <div class="alert-warning">
        ViewBag.Error
    </div>
}

@using (Html.BeginForm("PhotoSubmision", "Photos", FormMethod.Post, new { enctype = "multipart/form-data",  @class = "form-horizontal" }))
{

    @Html.HiddenFor(x => x.SubmitiedBy)
    @Html.HiddenFor(x => x.Photo)
    @Html.HiddenFor(x => x.Active)

    <div class="form-group">
        <label for="inputEmail3" class="col-sm-2 control-label">Photo Description</label>
        <div class="col-sm-10">
            @Html.TextBoxFor(model => model.PhotoDescription)
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-2 control-label">Photo Location</label>
        <div class="col-sm-10">
            @Html.TextBoxFor(model => model.PhotoLocation)
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-2 control-label">Year</label>
        <div class="col-sm-10">
            @Html.TextBoxFor(model => model.Year)
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-2 control-label">Photo Upload</label>
        <div class="col-sm-10">
            <input type="file" name="file" style="width: 100%;" /> 
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">Save</button>
        </div>
    </div>
}

